ostbuild: Remove /var from components
authorColin Walters <walters@verbum.org>
Tue, 15 May 2012 12:54:44 +0000 (08:54 -0400)
committerColin Walters <walters@verbum.org>
Fri, 18 May 2012 20:30:45 +0000 (16:30 -0400)
We expect them to create on demand.

src/ostbuild/pyostbuild/builtin_compile_one.py

index af9104a3220345623bfdefb8283de3ec450443c2..aa5fc84c40e38822d2cbea82795e06a72f950739 100755 (executable)
@@ -188,6 +188,12 @@ class OstbuildCompileOne(builtins.Builtin):
                 shutil.rmtree(resultdir)
             os.makedirs(resultdir)
 
+        # Remove /var from the install - components are required to
+        # auto-create these directories on demand.
+        varpath = os.path.join(tempdir, 'var')
+        if os.path.isdir(varpath):
+            shutil.rmtree(varpath)
+
         # Move symbolic links for shared libraries as well
         # as static libraries.  And delete all .la files.
         for libdirname in ['lib', 'usr/lib']: